<template>
    <div>
      <dynamicModel :isPreview="isPreview" ref="dynamicModel"></dynamicModel>
    </div>
  </template>
  
  <script>
  import DevFormServiceApi from "@/service/dev/DevFormService";
  
  export default {
    data() {
      return {
        isPreview:true,
        config: {},
        id: ''
      }
    },
    created() {
      this.init()
    },
    methods: {
      async init() {
        this.id = this.$route.query.id;
        let params = {
          id: this.id,
        };
        let result = await DevFormServiceApi.queryById(params);
        this.config = result.data
        this.config.columnData = JSON.parse(this.config.columnData)
        this.config.formData = JSON.parse(this.config.formData)
        this.$refs.dynamicModel.init(this.config);
      }
    },
  }
  </script>
  
  <style>
  
  </style>